CREATE TRIGGER ROLE_ASSIGNMENTS_TRG 
BEFORE INSERT ON ROLE_ASSIGNMENTS 
FOR EACH ROW 
BEGIN
  <<COLUMN_SEQUENCES>>
  BEGIN
    IF :NEW.ROLE_ASSIGNMENT_ID IS NULL THEN
      SELECT ROLE_ASSIGNMENTS_SEQ.NEXTVAL INTO :NEW.ROLE_ASSIGNMENT_ID FROM DUAL;
    END IF;
  END COLUMN_SEQUENCES;
END;
/
